Charging method and apparatus

ABSTRACT

Embodiments of this application provide a charging session method and an apparatus. A control plane function entity determines to request a charging function (CHF) entity to establish a service-based interface (SBI) charging session for a 4G data connection. The control plane function entity requests, through the SBI charging session, to perform online charging and/or offline charging in the 4G data connection. According to the method, the SBI charging session that is requested by the control plane function entity to establish for the 4G data connection may support performing the online charging in the 4G data connection, and support performing the offline charging in the 4G data connection. Therefore, the disclosed embodiments simplify a procedure of charging online data and offline data in the 4G data connection by using different charging sessions.

This application is a continuation of International Patent ApplicationNo. PCT/CN2020/078315 filed on Mar. 7, 2020, which claims priority toChinese Patent Application No. 201910252080.2 filed on Mar. 29, 2019.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a charging method and an apparatus.

BACKGROUND

As wireless communications technologies are rapidly developed, a fifthgeneration (Fifth Generation, 5G) mobile communications technologyemerges. At an early stage of network deployment, when a location of theterminal changes, a terminal may be handed over between a 5G network anda fourth generation (Fourth Generation, 4G) network due to limitedcoverage of the 5G network.

Handover between the 5G system and an evolved packet system (evolvedpacket system, EPS) may be performed between a mobility managemententity (Mobility Management Entity, MME) and an access and mobilitymanagement function (Access and Mobility Management Function, AMF)entity through an N26 interface. The 5G system may be referred to as a5GS, and the evolved packet system (evolved packet system, EPS) may bereferred to as a 4GS.

A current 4G charging system includes an online charging system and anoffline charging system. Online charging and offline charging arecontrolled by two sets of interfaces, and an online charging session andan offline charging session are separated. Therefore, when an operatordeploys both a 4G system and the 5G system, there are different charginginterfaces, protocols, and charging systems. As a result, it is complexto deploy the charging systems in an existing architecture.

SUMMARY

Embodiments of this application provide a charging method and apparatus,so that a charging session established for a terminal can adapt todifferent charging manners and charging systems, thereby simplifyingcharging system deployment.

To achieve the foregoing objective, the embodiments of this applicationprovide the following technical solutions.

According to a first aspect, a charging method for network systemhandover is provided. The method includes: A control plane functionentity determines to request a charging function entity to establish aservice-based interface SBI charging session for a 4G data connection.The control plane function entity requests, through the SBI chargingsession, to perform online charging and/or offline charging in the 4Gdata connection. According to the method, the SBI charging session thatis established by the control plane function entity for the 4G dataconnection may support performing the online charging in the 4G dataconnection, and support performing the offline charging in the 4G dataconnection. Therefore, this simplifies a procedure of charging onlinedata and offline data in the 4G data connection by using differentcharging sessions.

In a possible implementation, the control plane function entity includesa packet data network gateway control plane function. That a controlplane function entity determines to request the charging function entityto establish an SBI charging session includes any one of the following:The control plane function entity determines that the control planefunction entity further includes a session management function. Thecontrol plane function entity determines that a policy and chargingcontrol rule PCC rule includes indication of requesting the chargingfunction entity to establish the SBI charging session or includes: anaddress of a charging system designated for the 4G data connection is anaddress of the charging function entity using an SBI. The control planefunction entity determines that a previous charging session for the 4Gdata connection is an SBI charging session established with the chargingfunction entity. Alternatively, the control plane function entitydetermines to communicate with a policy function entity through an SBImessage. The foregoing optional methods can avoid establishing SBIcharging sessions for all 4G data connections, and ensure success ofestablishing the SBI charging session.

In a possible implementation, the control plane function entity includesa packet data network gateway control plane function. That a controlplane function entity determines to request a charging function entityto establish an SBI charging session for 4G data connection includes:The control plane function entity determines that the control planefunction entity determines further includes a session managementfunction. The control plane function entity determines that a terminalneeds to support handover from a 4G network to a 5G network. Theforegoing optional methods can avoid establishing SBI charging sessionsfor all 4G data connections, and ensure success of establishing the SBIcharging session.

In a possible implementation, the control plane function entity receivesa request for establishing the 4G data connection. That the controlplane function entity determines that the terminal needs to supporthandover from a 4G network to a 5G network includes: The control planefunction entity determines, based on a 5G system interworking indicationparameter in the request for establishing the 4G data connection, thatthe terminal supports gaining access to the 5G network and/or to allowthe 4G data connection to interwork with the 5G network. The foregoingoptional methods can avoid establishing SBI charging sessions for all 4Gdata connections, and ensure success of establishing the SBI chargingsession.

In a possible implementation, the control plane function entity furtherreceives a request for establishing the 4G data connection. The controlplane function entity includes a packet data network gateway controlplane function. That a control plane function entity determines torequest the charging function entity to establish an SBI chargingsession includes: The control plane function entity determines that thecontrol plane function entity further includes a session managementfunction. The control plane function entity determines, based on a 5Gsystem interworking indication parameter in the request for establishingthe 4G data connection, that a terminal supports gaining access to a 5Gnetwork and/or to allow the 4G data connection to interwork with the 5Gnetwork. The foregoing optional methods can avoid establishing SBIcharging sessions for all 4G data connections, and ensure success ofestablishing the SBI charging session.

In a possible implementation, during handover from the 4G dataconnection to a 5G data connection, the method further includes:

The control plane function entity determines that a 4G handover triggeris in an active state, and that a type of the 4G handover trigger is animmediate reporting trigger. The control plane function entity sends acharging update message to the charging function entity through the SBIcharging session. The charging update message includes network usageinformation of the 4G data connection and/or a quota request for the 5Gdata connection after the handover. According to the foregoing method,the control plane function entity may charge, by using the SBI chargingsession established for the 4G data connection in the 4G network,network usage of the 5G data connection after the handover. In this way,there is no need to re-establish a charging session for the 5G dataconnection after the handover, thereby simplifying a network handoverprocedure.

In a possible implementation, during handover from the 4G dataconnection to a 5G data connection, the control plane function entitydetermines that a 4G handover trigger is in an active state, and that atype of the 4G handover trigger is a deferred reporting trigger. Thecontrol plane function entity stops recording network usage informationof the 4G data connection, and re-records network usage information ofthe 5G data connection after the handover. According to the foregoingmethod, after the handover, network usage of the 4G data connection andnetwork usage of the 5G data connection are processed based on a statusand the type of the trigger, so that charging is more accurate.

In a possible implementation, the control plane function entity uses aquota obtained for the 4G data connection for the 5G data connection inthe 5G network. According to the foregoing method, after the handover,network usage of the 4G data connection and network usage of the 5G dataconnection are processed based on information of the trigger, so thatcharging is more accurate.

In a possible implementation, the control plane function entity storesan available 4G quota for the 4G data connection. The control planefunction entity uses the 4G quota for the 5G data connection. Accordingto the foregoing method, after the handover, network usage of the 4Gdata connection and network usage of the 5G data connection areprocessed based on information of the trigger, so that charging is moreaccurate.

In a possible implementation, the control plane function entityprocesses an activated 4G charging trigger event trigger for the 4G dataconnection. According to the foregoing method, after the handover, usageof the 4G network and usage of the 5G network are processed based oninformation of the trigger, so that charging is more accurate.

In a possible implementation, the control plane function entitydetermines that the activated 4G charging trigger for the 4G dataconnection is not support in the 5G data connection after the handover,and the control plane function entity ignores, in the 5G data connectionafter the handover, the 4G charging trigger. The control plane functionentity determines that the 5G data connection after the handoversupports the activated 4G charging trigger for the 4G data connection,and the control plane function entity uses, in the 5G data connectionafter the handover, the 4G charging trigger. Alternatively, the controlplane function entity maps the activated 4G charging trigger for the 4Gdata connection to a 5G charging trigger for the 5G network, and usesthe mapped 5G charging trigger for the 5G data connection after thehandover. According to the foregoing method, the 4G charging trigger isprocessed after the handover, so that charging is more accurate.

According to a second aspect, a charging method for network systemhandover is provided. The method includes: A control plane functionentity sends a charging service establishment message for a 5G dataconnection to a charging function entity through a service-basedinterface SBI. The service establishment request message is used torequest to establish an SBI charging session for the 5G data connection.The control plane function entity requests, through the SBI chargingsession, to perform online charging and/or offline charging in the 5Gdata connection. After handover from the 5G data connection to a 4G dataconnection, the control plane function entity requests, through the SBIcharging session, to perform online charging and/or offline charging inthe 4G data connection. According to the foregoing method, the controlplane function entity may charge, by using the SBI charging sessionestablished for the 5G data connection, network usage of the 4G dataconnection after the handover. In this way, there is no need tore-establish a charging session for the 4G data connection after thehandover, thereby simplifying a network handover procedure.

In a possible implementation, during the handover from the 5G dataconnection to the 4G data connection,

the control plane function entity determines that a 5G handover triggeris in an active state, and that a type of the 5G handover trigger is animmediate reporting trigger. The control plane function entity sends acharging update message to the charging function entity through the SBIcharging session. The charging update message includes network usageinformation of the 5G data connection and/or a quota request for the 4Gdata connection after the handover. According to the foregoing method,the 5G charging trigger is processed after the handover, so thatcharging is more accurate.

In a possible implementation, during the handover from the 5G dataconnection to the 4G data connection,

the control plane function entity determines that a 5G handover triggeris in an active state, and that a type of the 5G handover trigger is adeferred reporting trigger. The control plane function entity stopsrecording network usage information of the 5G data connection, andre-records network usage information of the 4G data connection after thehandover. According to the foregoing method, the 5G charging trigger isprocessed after the handover, so that charging is more accurate.

In a possible implementation, the control plane function entity uses aquota obtained for the 5G data connection for the 4G data connection in4G network. According to the foregoing method, after the handover, thequota in the 5G network is used, and there is no need to apply for aquota for the 4G data connection. Therefore, a service is processed moresmoothly.

In a possible implementation, during the handover from the 5G dataconnection to the 4G data connection, the control plane function entitydetermines that there is no active 5G handover trigger. The controlplane function entity records network usage information of the 5G dataconnection and network usage information of the 4G data connection.According to the foregoing method, the 5G charging trigger is processedafter the handover, so that charging is more accurate.

In a possible implementation, the control plane function entityprocesses an activated 5G charging trigger for the 5G data connection.According to the foregoing method, the 5G charging trigger is processedafter the handover, so that charging is more accurate.

In a possible implementation, the control plane function entitydetermines that the activated 5G charging trigger for the 5G dataconnection is not supported in the 4G data connection after thehandover, and ignores, in the 4G data connection after the handover, the5G charging trigger. The control plane function entity determines thatthe 4G data connection after the handover supports the activated 5Gcharging trigger for the 5G data connection, and uses the 5G chargingtrigger for the 4G data connection after the handover. The control planefunction entity maps the activated 5G charging trigger for the 5G dataconnection to a 4G charging trigger for the 4G network, and uses themapped 4G charging trigger for the 4G data connection after thehandover. According to the foregoing method, the 5G charging trigger isprocessed after the handover, so that charging is more accurate.

In a possible implementation, after a network handover request for the5G data connection is received, the control plane function entitydetermines that the control plane function entity does not supportpassing an online charging data flow in a 4G network before obtaining aquota granted by the charging function entity. The control planefunction entity passes the online charging data flow after receiving thequota granted by the charging function entity. According to theforegoing method, the 5G charging trigger is processed after thehandover, so that charging is more accurate.

According to a third aspect, a charging method for network systemhandover is provided. For a first network data connection, a controlplane function entity sends a charging service establishment message toa charging function entity, to request to establish a charging sessionfor the first network data connection. The charging function entityperforms online charging and/or offline charging in the first networkdata connection by using the charging session. After handover from thefirst network data connection to a second network data connection, thecontrol plane function entity requests, through the charging session, toperform online charging and/or offline charging in the second networkdata connection established for the terminal. According to the foregoingmethod, after the handover from the first network data connection to thesecond network data connection, the control plane function entitycharges, by using the charging session established for the first networkdata connection before the handover, network usage of the second networkdata connection. Therefore, there is no need to re-establish a chargingsession after the terminal is handed over to the second network, therebysimplifying a handover procedure.

In a possible implementation, the first network is a 4G network, and thesecond network is a 5G network. The control plane function entity mayperform processing performed by the control plane function entity in allpossible implementations of the first aspect.

In a possible implementation, the first network is a 5G network, and thesecond network is a 4G network. The control plane function entity mayperform processing performed by the control plane function entity in allpossible implementations of the first aspect.

According to a fourth aspect, a charging method is provided. A controlplane function entity determines to request a charging function entityto establish a service-based interface SBI charging session for a 4Gdata connection. The charging function entity performs online chargingand/or offline charging in the 4G data connection by using the SBIcharging session. According to the method, the SBI charging session thatis established by the control plane function entity for the 4G dataconnection may support performing the online charging in the 4G dataconnection, and support performing the offline charging in the 4G dataconnection. Therefore, this simplifies a procedure of charging onlinedata and offline data in the 4G data connection by using differentcharging sessions.

In a possible implementation, the control plane function entity mayperform any processing performed by the control plane function entity inall possible implementations of the first aspect.

In a possible implementation, the charging function entity may performall possible implementations of the first aspect, and/or performprocessing performed by the charging function entity in the procedurescorresponding to FIG. 3A, FIG. 3B, and FIG. 4A to FIG. 4D.

According to a fifth aspect, a charging method is provided. The methodincludes: A charging function entity receives a charging serviceestablishment message sent by a control plane function entity through anSBI. The charging service establishment message sent through the SBI isused to request to establish for a 4G data connection, an SBI chargingsession that supports performing online charging and performing offlinecharging in the 4G data connection. The charging function entityperforms the online charging and/or the offline charging in the 4G dataconnection. According to the method, the charging function entityestablishes the SBI charging session for the 4G data connection, so thatthe SBI charging session can support performing the online charging inthe 4G data connection, and support performing offline charging in the4G data connection.

In a possible implementation, the charging function entity receives acharging session update message through the SBI charging session. Thecharging session update message carries an identifier of a 5G dataconnection after handover.

In a possible implementation, the charging session update messagecarries network usage information of the 4G data connection and/or aquota request for the 5G data connection in 5G network. The chargingfunction entity performs the online charging and/or the offline chargingin the network usage information of the 4G data connection based on thecharging session update message. The charging function entity grants aquota to the 5G data connection in the 5G network.

In a possible implementation, the charging function entity specifies a5G charging parameter for the 5G data connection.

According to a sixth aspect, a charging method for network handover isprovided. The method includes: A charging function entity receives acharging service establishment message sent by a control plane functionentity. The charging service establishment message is used to request toestablish a charging session for a first network data connection. Thecharging function entity receives a charging session update messagethrough the charging session. The charging session update messagecarries an identifier of a second network data connection and networkusage information of the first network data connection. After theterminal is handed over from the accessed first network to a secondnetwork, the charging function entity charges the second network dataconnection by using the charging session. According to the foregoingmethod, the charging function entity may charge usage information of thesecond network data connection after the handover by using the chargingsession established for the first network data connection. Therefore,there is no need to re-establish a charging session after the terminalis handed over to the second network connection, thereby simplifying ahandover and charging procedure.

In a possible implementation, the first network is a 4G network, and thesecond network is a 5G network. The charging function entity may performall possible implementations of the first aspect, or perform processingperformed by the charging function entity in FIG. 3A, FIG. 3C, and FIG.4A to FIG. 4D.

In a possible implementation, the first network is a 5G network, and thesecond network is a 4G network. The charging function entity may performall possible implementations of the first aspect, or perform processingperformed by the charging function entity in FIG. 3B, and FIG. 5A andFIG. 5B.

According to a seventh aspect, a charging method for network handover isprovided. The method includes: For a first network data connection, thecontrol plane function entity sends a charging service establishmentmessage to a charging function entity, to request to establish acharging session for the first network data connection. The chargingfucntion entity performs online charging and/or offline charging in thefirst network data connection in the charging session. After handoverfrom the first network data connection to a second network dataconnection, the charging function entity performs online charging and/oroffline charging in the second network data connection by using thecharging session. According to the foregoing method, the control planefunction entity and the charging function entity may charge, by usingthe charging session established for the first data connection, networkusage of a terminal in the second network data connection after thehandover. Therefore, there is no need to re-establish a charging sessionafter the terminal is handed over to the second network connection,thereby simplifying a handover and charging procedure.

In a possible implementation, the first network is a 4G network, and thesecond network is a 5G network. The charging function entity may performall possible implementations of the first aspect, or perform processingperformed by the charging function entity in FIG. 3A, FIG. 3C, and FIG.4A to FIG. 4D. The control plane function entity may perform allpossible implementations of the first aspect, or perform processingperformed by the control plane function entity in FIG. 3A, FIG. 3C, andFIG. 4A to FIG. 4D.

In a possible implementation, the first network is a 5G network, and thesecond network is a 4G network. The charging function entity may performall possible implementations of the second aspect, or perform processingperformed by the charging function entity in FIG. 3B, and FIG. 5A andFIG. 5B. The control plane function entity may perform all possibleimplementations of the second aspect, or perform processing performed bythe control plane function entity in FIG. 3B, and FIG. 5A and FIG. 5B.

According to an eighth aspect, a charging method for network handover isprovided. The method includes: The control plane function entityrequests a charging function entity to establish a service-basedinterface SBI charging session for a 4G data connection. The chargingfunction entity performs online charging and/or offline charging in the4G data connection by using the SBI charging session. The foregoingoptional methods can avoid establishing SBI charging sessions for all 4Gdata connections, and ensure success of establishing the SBI chargingsession.

According to a ninth aspect, an apparatus is provided. The apparatus hasfunctions of implementing the control plane function entity in themethod according to the first aspect, the second aspect, or the thirdaspect. The functions may be implemented by hardware, or may beimplemented by hardware executing corresponding software. The hardwareor the software includes one or more modules corresponding to thefunctions.

According to a tenth aspect, an apparatus is provided and includes aprocessor and a memory. The memory is configured to store a computerexecution instruction. When the apparatus runs, the processor executesthe computer execution instruction stored in the memory, so that theapparatus performs the method according to any one of the first aspect,the second aspect, or the third aspect. The apparatus may bespecifically the control plane network function entity in the methodaccording to any one of the first aspect, the second aspect, or thethird aspect, or a chip in the control plane network function entity.

According to an eleventh aspect, a computer-readable storage medium isprovided. The computer-readable storage medium stores an instruction.When the instruction is run on a computer, the computer is enabled toperform the charging method according to any one of the first aspect,the second aspect, or the third aspect.

According to a twelfth aspect, a computer program product including aninstruction is provided. When the computer program product runs on acomputer, the computer is enabled to perform the charging method fornetwork system handover according to any one of the first aspect.

For technical effects brought by any design manner of the second to thesixth aspects, refer to technical effects brought by different designmanners of the first aspect, and details are not described herein again.

According to a thirteenth aspect, an apparatus is provided. Theapparatus has functions of implementing the method according to thefifth aspect and/or the sixth aspect. The functions may be implementedby hardware, or may be implemented by hardware executing correspondingsoftware. The hardware or the software includes one or more modulescorresponding to the functions.

According to a fourteenth aspect, an apparatus is provided and includesa processor and a memory. The memory is configured to store a computerexecution instruction. When the apparatus runs, the processor executesthe computer execution instruction stored in the memory, so that theapparatus performs the method according to either of the fifth aspectand/or the sixth aspect.

According to a fifteenth aspect, a computer-readable storage medium isprovided. The computer-readable storage medium stores an instruction.When the instruction is run on a computer, the computer is enabled toperform the charging method according to either of the fifth aspectand/or the sixth aspect.

According to a sixteenth aspect, a computer program product including aninstruction is provided. When the computer program product runs on acomputer, the computer is enabled to perform the charging methodaccording to either of the fifth aspect and/or the sixth aspect.

According to a seventeenth aspect, a system is provided and includes acontrol plane function entity and a charging function entity. Thecontrol plane function entity may perform processing performed by thecontrol plane function entity in any one of the foregoing aspects. Thecharging function entity may perform processing performed by thecharging function entity in any one of the foregoing aspects.

These aspects or other aspects of this application are clearer and morecomprehensible in descriptions of the following embodiments.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of an interworking architecture of a firstnetwork and a second network;

FIG. 2 is a schematic diagram of a hardware structure of acommunications device according to an embodiment of this disclosure;

FIG. 3A is a schematic flowchart of a charging method for a 4G dataconnection according to an embodiment of this disclosure;

FIG. 3B is a schematic flowchart of a charging method when a terminal ishanded over from a 5G data connection to a 4G data connection accordingto an embodiment of this disclosure;

FIG. 3C is a schematic flowchart of a charging method when a terminal ishanded over from a first network data connection to a second networkdata connection according to an embodiment of this disclosure;

FIG. 4A is a schematic flowchart of a charging method when a terminal ishanded over from a 4G network to a 5G network according to an embodimentof this disclosure;

FIG. 4B is a schematic flowchart of charging processing after a networkhandover request for handling over a 4G data connection to a 5G dataconnection is received according to an embodiment of this disclosure;

FIG. 4C is a schematic diagram of determining, by a control planefunction entity, to request a charging function entity to establish anSBI charging session for a 4G data connection according to an embodimentof the present disclosure;

FIG. 4D is a charging trigger mapping table in which a 5G chargingtrigger is mapped to a 4G charging trigger;

FIG. 5A is a schematic flowchart of a charging method when a terminal ishanded over from a 5G network to a 4G network according to an embodimentof this disclosure;

FIG. 5B is a schematic flowchart of charging processing after a networkhandover request for handling over a 5G data connection to a 4G dataconnection is received according to an embodiment of this disclosure;

FIG. 6A is a schematic diagram of triggers included in a 4G chargingtrigger according to an embodiment of this disclosure;

FIG. 6B is a schematic diagram of triggers included in a 5G chargingtrigger according to an embodiment of this disclosure;

FIG. 7 is a schematic diagram of a structure of an apparatus accordingto an embodiment of this disclosure;

FIG. 8A is a schematic diagram of a structure of an apparatus accordingto an embodiment of this disclosure;

FIG. 8B is a schematic diagram of a structure of an apparatus accordingto an embodiment of this disclosure; and

FIG. 9 is a schematic diagram of a system structure according to anembodiment of this disclosure.

DESCRIPTION OF EMBODIMENTS

Network interworking indicates that different networks can communicatewith each other. In a network interworking scenario, terminal access canbe handed over between different networks. The network interworking alsoindicates handover between different network data connections. Handoverbetween different networks in the network interworking scenario may be:network handover performed by a terminal when a location of the terminalchanges, handover of terminal access between the different networks dueto a change of signal strength of the different networks, or networkhandover because a user actively chooses to gain access to a differentnetwork. Network handover may be handover between a 4G network and a 5Gnetwork. The 4G network may also be referred to as an evolved packetsystem (evolved packet system, EPS).

The network architecture and the service scenario described in theembodiments of the present disclosure are intended to describe thetechnical solutions in the embodiments of the present disclosure moreclearly, and do not constitute a limitation on the technical solutionsprovided in the embodiments of the present disclosure. A person ofordinary skill in the art may know that: With the evolution of thenetwork architecture and the emergence of new service scenarios, thetechnical solutions provided in the embodiments of the presentdisclosure are also applicable to similar technical problems.

Embodiments of the present disclosure provide a charging method and anapparatus, to perform charging in a 4G data connection, and performcharging in a scenario in which handover is performed between a firstnetwork and a second network. The first network may be a 4G network, andthe second network may be a 5G network. In another optional manner, thefirst network may be a 5G network, and the second network is a 4Gnetwork.

Embodiments of the present disclosure provide a charging method and anapparatus, applicable to a system 100 in an interworking architectureshown in FIG. 1. It should be noted that the embodiments of the presentdisclosure are similarly applicable to interworking between anotherconventional network and a network based on a service-basedarchitecture.

Alternatively, as shown in FIG. 1, the system 100 includes a user planefunction entity 108, a control plane function entity 106, a policycontrol function entity 104, and a user subscription database 102 thatare integrated in a 4G network and a 5G network. The integrated controlplane function entity 106 includes a packet data network (packet datanetwork, PDN) gateway control plane function (PDN gateway control planefunction, PGW-C) in the 4G network and a session management function(session management function, SMF) in the 5G network. The integrateduser plane function entity 108 includes a user plane function (userplane function, UPF) and a PDN gateway control plane function (PGW-U).The integrated policy control function entity 104 includes a policycontrol function (policy control function, PCF) and a policy andcharging rules function (policy and charging rules function, PCRF). Theintegrated user subscription database 102 includes a home subscriberserver (Home Subscriber Server, HSS) and unified data management(unified data management, UDM). The system 100 further includes anSBI-based charging function (Charging Function, CHF) entity 122 in the5G network. The system 100 further includes a 4G online charging system(not shown in the figure) and a 4G offline charging system (not shown inthe figure).

In the foregoing integrated entity, the UPF entity is a user planefunction entity in the 5G network, and the PGW-U entity is a gatewayuser plane function in the 4G network. The SMF entity is a sessionmanagement function entity in the 5G network, and the PGW-C entity is acontrol plane function entity of a data gateway in the 4G network. ThePCF entity is a policy control function entity in the 5G network. ThePCRF entity is a policy and charging rules function entity in the 4Gnetwork. “Integrated” herein indicates that a same device has functionsof both a network entity in the 4G network and a corresponding entity inthe 5G network. Therefore, an integrated entity may support the 4Gnetwork and the 5G network.

The integrated user plane function entity 108 may be referred to as auser plane function entity for short. The integrated control planefunction entity 106 may be referred to as a control plane functionentity for short. The integrated policy control function entity 104 maybe referred to as a policy control function entity 106 for short. Theintegrated user subscription database 102 may be referred to as a usersubscription database 102 for short. The foregoing network devicesobtained after the integrated configuration may also use other names.This is not specifically limited in this embodiment of this application.

In addition, the system 100 shown in FIG. 1 may further include amobility management entity (Mobility Management Entity, MME) 118 and aserving gateway (Serving Gateway, SGW) 116 in the 4G network, and anaccess and mobility management function (Access and Mobility ManagementFunction, AMF) entity 110 in the 5G network.

A terminal 114 gains access to the 4G network by using an evolveduniversal terrestrial radio access network (evolved universalterrestrial radio access network, E-UTRAN) device 120, and the terminal114 gains access to the 5G network by using a next generation radioaccess network (next generation radio access network, NG-RAN) device112. The E-UTRAN device 120 communicates with the MME 118 through anS1-MME interface.

It should be noted that names of interfaces between network elements inFIG. 1 are only examples, and the interfaces may have other names duringspecific implementation. This is not specifically limited in thisembodiment of this application.

Certainly, there may be another network element in the 4G network andthe 5G network. For example, the 5G network may further include anauthentication server function (authentication server function, AUSF)entity, a network slice selection function (network slice selectionfunction, NSSF) entity, and the like, this is not specifically limitedin this embodiment of this application.

A PDN connection or an IP connectivity access network (IP connectivityaccess network session, IP-CAN session) connection in the 4G network issupported by the PGW-C in the network element 106 integrated by thePGW-C and the SMF and the PGW-U in the network element 108 integrated bythe PGW-U and the UPF. The PDN connection or the IP-CAN session may bereferred to as a 4G data connection. After terminal access is handedover from the 4G network to the 5G network, a PDU session obtained afterthe handover is supported by the SMF in the control plane functionentity 106 and the UPF in the integrated user plane function entity 108.

The terminal (terminal) 114 in this embodiment of this applicationincludes a device that supports only to gain access to the 4G network,or may include a device that supports to gain access to both the 4Gnetwork and the 5G network. These devices may include various handhelddevices, in-vehicle devices, wearable devices, or computing devices thathave a wireless communication function, or other processing devicesconnected to a wireless modem, may further include a cellular phone(cellular phone), a smartphone (smart phone), a wireless data card, apersonal digital assistant (personal digital assistant, PDA) computer, atablet computer, a wireless modem (modem), a laptop computer (laptopcomputer), a machine type communication (machine type communication,MTC) terminal, user equipment (user equipment, UE), or the like. Forease of description, the foregoing devices are collectively referred toas a terminal in this application.

The following describes the technical solutions in the embodiments ofthis application with reference to the accompanying drawings in theembodiments of this application. In the descriptions of thisapplication, unless otherwise specified, “a plurality of” means two ormore than two. In addition, for convenience of clear description of thetechnical solutions in the embodiments of this application, in theembodiments of this application, terms such as “first” and “second” areused to distinguish between same objects or similar objects whosefunctions and purposes are basically the same. A person skilled in theart may understand that the terms, such as “first” and “second”, are notintended to limit a quantity or an execution sequence; and the terms,such as “first” and “second”, do not indicate a definite difference. “Aand/or B” in the present disclosure may be explained as any one of A orB, or include A and B.

As shown in FIG. 2, the network element or the device shown in FIG. 1,for example, the terminal 114, the MME 118, the AMF 110, the controlplane function entity 106, the policy control function entity 104, theuser subscription database 102, the E-UTRAN 120, or the NG-RAN 112, maybe implemented in a communications device (or system) in FIG. 2.

FIG. 2 is a schematic diagram of a hardware structure of thecommunications device according to an embodiment of this application.The communications device 200 includes at least one processor 201, acommunications line 202, a memory 203, and at least one communicationsinterface 204.

The processor 201 may be a general-purpose central processing unit(central processing unit, CPU), a microprocessor, anapplication-specific integrated circuit (application-specific integratedcircuit, ASIC), or one or more integrated circuits that are configuredto control execution of a program in a solution of this application.

The communications line 202 may include a path for transmittinginformation between the foregoing components.

The communications interface 204 uses any apparatus such as atransceiver, to communicate with another device or a communicationsnetwork, for example, the Ethernet, a radio access network (radio accessnetwork, RAN), or wireless local area networks (wireless local areanetworks, WLAN).

The memory 203 may be a read-only memory (read-only memory, ROM) oranother type of static storage device that can store static informationand instructions, or random access memory (random access memory, RAM) oranother type of dynamic storage device that can store information andinstructions. The memory 203 may alternatively be an electricallyerasable programmable read-only memory (electrically erasableprogrammable read-only memory, EEPROM) and a compact disc read-onlymemory (compact disc read-only memory, CD-ROM) or another compact discstorage, optical disc storage (including a compact disc, a laser disc,an optical disc, a digital versatile disc, a Blu-ray optical disc, andthe like) and a magnetic disk storage medium or another magnetic storagedevice. The memory 203 may alternatively be any other medium that can beused to carry or store expected program code in a form of an instructionor a data structure and that can be accessed by a computer, but is notlimited thereto. The memory may exist independently, and is connected tothe processor through the communications line 202. The memory mayalternatively be integrated with the processor.

The memory 203 is configured to store a computer execution instructionfor executing the solutions of this application, and the processor 201controls the execution. The processor 201 is configured to execute thecomputer execution instruction stored in the memory 203, to implement asession establishment method provided in the following embodiments ofthis application.

Optionally, the computer execution instructions in this embodiment ofthis application may also be referred to as application program code.This is not specifically limited in this embodiment of this application.

During specific implementation, in an embodiment, the processor 201 mayinclude one or more CPUs.

During specific implementation, in an embodiment, the communicationsdevice 200 may include a plurality of processors, for example, theprocessor 201 and a processor 208 in FIG. 2. Each of the processors maybe a single-core (single-CPU) processor or a multi-core (multi-CPU)processor. The processor herein may be one or more devices, circuits,and/or processing cores for processing data (for example, computerprogram instructions).

During specific implementation, in an embodiment, the communicationsdevice 200 may further include an output device 205 and an input device206. The output device 205 communicates with the processor 201, and maydisplay information in a plurality of manners. For example, the outputdevice 205 may be a liquid crystal display (liquid crystal display,LCD), a light emitting diode (light emitting diode, LED) display device,a cathode ray tube (cathode ray tube, CRT) display device, a projector(projector), or the like. The input device 206 communicates with theprocessor 201, and may receive input from a user in a plurality ofmanners. For example, the input device 206 may be a mouse, a keyboard, atouchscreen device, or a sensing device.

The foregoing communications device 200 may be a general-purpose deviceor a dedicated device. During specific implementation, thecommunications device 200 may be a desktop computer, a portablecomputer, a network server, a single-chip microcomputer, a blade server,a palmtop computer (personal digital assistant, PDA), a mobile phone, atablet computer, a wireless terminal device, an embedded device, anynetwork entity, or a device having a structure similar to that in FIG.2. A type of the communications device 200 is not limited in thisembodiment of this application.

The following describes in detail a session establishment methodprovided in the embodiments of this application with reference to FIG. 1to FIG. 2.

FIG. 3A is a schematic flowchart of a charging method for a 4G dataconnection according to an embodiment of this application. In thisembodiment, a terminal 114 may be a 4G terminal that supports a 4Gnetwork, or may be a terminal that supports both a 4G network and a 5Gnetwork. The charging method in this embodiment includes the followingsteps.

Step 301: A control plane function entity 106 determines to request acharging function entity 122 to establish a service-based interface SBIcharging session for the 4G data connection.

The 4G data connection may be a 4G data connection that is beingestablished, or may be an established 4G data connection. The 4G dataconnection that is being established is a 4G data connection that isestablished by the control plane function entity based on a request forestablishing the 4G data connection after receiving the request forestablishing the 4G data connection.

Step 302: The control plane function entity 106 and the chargingfunction entity 122 establish the service-based interface (service basicinterface, SBI) charging session for the 4G data connection.

Specifically, the control plane function entity 106 may send a chargingservice establishment message to the charging function entity 122, torequest to establish the SBI charging session for the 4G dataconnection. The charging function entity 122 returns a charging sessionestablishment response message to the control plane function entity 106to complete establishment of the SBI charging session.

Step 304: The control plane function entity 106 and the chargingfunction entity 122 perform online charging and/or offline charging inthe 4G data connection by using the SBI charging session.

According to the method, the SBI charging session that is established bythe control plane function entity 106 and the charging function entity122 for the 4G data connection may support the online charging in the 4Gdata connection, and support the offline charging in the 4G dataconnection. Therefore, this simplifies a procedure of charging onlinedata and offline data in the 4G data connection in the 4G network byusing different charging sessions.

FIG. 3B is a schematic flowchart of a charging method when a terminal ishanded over from a 5G data connection to a 4G data connection accordingto an embodiment of this application. In this embodiment, a 5G networkis first accessed, and the 5G connection is established in the 5Gnetwork. Subsequently, a terminal 114 gains access to a 4G network, andestablishes the 4G data connection in the 4G network. The methodincludes the following steps.

Step 311: A control plane function entity 106 and a charging functionentity 122 establish a service-based interface (service basic interface,SBI) charging session for the 5G data connection.

The establishing an SBI charging session includes: The control planefunction entity 106 sends a charging service establishment message tothe charging function entity 122 through an SBI. The charging serviceestablishment request message is used to request to establish the SBIcharging session for the 5G data connection. The charging functionentity 122 returns a charging session establishment response message tothe control plane function entity 106 to complete establishment of theSBI charging session.

Step 312: The control plane function entity 106 and the chargingfunction entity 122 perform online charging and/or offline charging inthe 5G data connection by using the SBI charging session.

Specifically, the control plane function entity 106 requests, throughthe SBI charging session, to perform the online charging and/or theoffline charging in the 5G data connection. The charging function entity122 performs the online charging and/or the offline charging in the 5Gdata connection based on the request of the control plane functionentity 106.

Step 313: The terminal 114 is handed over from the 5G data connection tothe 4G data connection.

Step 314: After the handover from the 5G data connection the 4G dataconnection, the control plane function entity 106 and the chargingfunction entity 122 perform online charging and/or offline charging inthe 4G data connection by using the SBI charging session.

Specifically, the control plane function entity 106 requests, throughthe SBI charging session, to perform the online charging and/or theoffline charging in the 4G data connection. The charging function entity122 performs the online charging and/or the offline charging in the 4Gdata connection based on the request of the control plane functionentity 106.

Optionally, the control plane function entity 106 may perform processingperformed by a control plane function entity 106 in FIG. 5A and FIG. 5B.The charging function entity 122 may perform processing performed by acharging function entity 122 in FIG. 5A and FIG. 5B.

According to the foregoing method, the control plane function entity 106may charge, by using the SBI charging session established for the 5Gdata connection, network usage of the 4G data connection after thehandover. In this way, there is no need to re-establish a chargingsession for the 4G data connection after the handover, therebysimplifying a network handover and charging procedure.

Optionally, the control plane function entity 106 in FIG. 3B may performsteps performed by a control plane function entity 106 in FIG. 4A toFIG. 4D. The charging function entity 122 may perform steps performed bya charging function entity 122 in FIG. 4A to FIG. 4D. Therefore, themethod provided in FIG. 3B may be further applicable to a scenario inwhich charging is performed when the terminal 114 is handed over from a4G data connection to a 5G data connection.

FIG. 3C is a schematic flowchart of a charging method when a terminal ishanded over from a first network data connection to a second networkdata connection according to an embodiment of this application. In thisembodiment, a terminal 114 first gains access to a first network, andestablishes the first network connection in the first network.Subsequently, the terminal 114 gains access to the second network. Thefirst network may be a 4G network, and the second network may be a 5Gnetwork. Alternatively, the second network may be a 4G network, and thefirst network may be a 5G network. The method includes the followingsteps.

Step 321: A control plane function entity 106 and a charging functionentity 122 establish a charging session for the first network dataconnection.

The establishing a charging session includes: The control plane functionentity 106 sends a charging establishment message to the chargingfunction entity 122. The charging establishment request message is usedto request to establish the charging session for the first network dataconnection. The charging function entity 122 returns a charging sessionestablishment response message to the control plane function entity 106to complete establishment of the charging session.

Step 322: The control plane function entity 106 and the chargingfunction entity 122 perform online charging and/or offline charging inthe first network data connection by using the charging session.

Specifically, the control plane function entity 106 requests, throughthe charging session, to perform the online charging and/or the offlinecharging in the first network data connection. The charging functionentity 122 performs the online charging and/or the offline charging inthe first network data connection based on the request of the controlplane function entity 106.

Step 323: The terminal 114 is handed over from the first network dataconnection to the second network data connection.

Step 324: After the handover from the first network data connection tothe second network data connection, the control plane function entity106 and the charging function entity 122 perform online charging and/oroffline charging in the second network data connection by using thecharging session.

Specifically, the control plane function entity 106 requests, throughthe charging session, to perform the online charging and/or the offlinecharging in the second network data connection after the handover. Thecharging function entity 122 performs the online charging and/or theoffline charging in the second network data connection based on therequest of the control plane function entity 106.

In an optional manner, the first network is the 4G network, and thesecond network may be the 5G network. The control plane function entity106 may perform processing performed by a control plane function entity106 in FIG. 4A to FIG. 4D. The charging function entity 122 may performprocessing performed by a charging function entity 122 in FIG. 4A toFIG. 4D.

In an optional manner, the first network is the 5G network, and thesecond network is the 4G network. The control plane function entity 106may perform processing performed by a control plane function entity 106in FIG. 5A and FIG. 5B. The charging function entity 122 may performprocessing performed by a charging function entity 122 in FIG. 5A andFIG. 5B.

In an optional manner, the charging session may be a 4G chargingsession, or may be a 5G charging session. A charging session establishedfor the 4G data connection is the 4G charging session, and a chargingsession established for the 5G data connection is the 5G chargingsession.

According to the method provided in FIG. 3C, the charging functionentity may charge, by using the charging session established for thefirst network data connection, network usage of the second network dataconnection after the handover. In this way, there is no need tore-establish a charging session for the 5G data connection after thehandover, thereby simplifying a network handover procedure.

FIG. 4A is a schematic flowchart of a charging method when a terminal114 is handed over from a 4G network to a 5G network according to anembodiment of this application. In this embodiment, the terminal 114first gains access to the 4G network by using an E-UTRAN device, andestablishes a PDN connection or an IP-CAN session connection in the 4Gnetwork. The following uses the IP-CAN session connection as an example.After gaining access to the 4G network, the terminal 114 gains access tothe 5G network by using an NG-RAN device. The method includes thefollowing steps.

Step 402: A serving gateway 110 initiates, to a control plane functionentity 106, a request for establishing an IP-CAN session.

The request for establishing the IP-CAN session is referred to as arequest for establishing a 4G data connection. A packet data networkgateway control plane function of the control plane function entity 106receives, from the serving gateway 110, the request for establishing the4G data connection. The request for establishing the 4G data connectionis used to request to establish the 4G data connection for the terminal114.

After the terminal 114 initiates establishment of the 4G dataconnection, the serving gateway 110 may initiate, to the control planefunction entity 106, the request for establishing the 4G dataconnection.

The 4G data connection may be established by the terminal 114 in anattach process, or may be established by the terminal 114 after theterminal 114 is attached. For a process of establishing the IP-CANsession connection, refer to an existing protocol (for example, 3GPP TS23 23.401). Details are not described herein.

Step 404: The control plane function entity 106 determines to request acharging function entity 122 to establish an SBI charging session forthe 4G data connection. The 4G data connection may be an IP-CAN sessionconnection that is being established, or an established IP-CAN sessionconnection.

After the control plane function entity 106 receives the request forestablishing the IP-CAN session from the serving gateway 116, or after acharging session of the IP-CAN session is released in a life cycle ofthe IP-CAN session, when the control plane function entity 106determines to re-establish a charging session, step 404 is performed.

After receiving the request for establishing the 4G data connection, thecontrol plane function entity 106 determines that the terminal 114 maybe subsequently handed over to the 5G network, and determines to requestthe charging function entity 122 to establish the SBI charging session.It should be noted that the terminal 114 may establish one or moreIP-CAN session connections in the 4G network, and the one or more IP-CANsession connections may be supported by one or more control planefunction entities 106. This is not limited in this embodiment of thisapplication. For ease of description, in this embodiment of thisapplication, only an example in which the terminal 114 establishes theIP-CAN session connection by using one control plane function entity isused.

The control plane function entity 106 requests to establish the SBIcharging session with an IP-CAN session granularity for the IP-CANsession. The SBI charging session is used to send a charging updatemessage of online and/or offline (for example, online, or offline, oronline and offline) charging content of the IP-CAN Session. That thecharging session granularity is an IP-CAN session means that one IP-CANsession corresponds to one charging session.

After receiving the request for establishing the IP-CAN sessionconnection, the control plane function entity 106 determines to requestthe charging function entity to establish the SBI charging session,which may be that shown in FIG. 4C.

Step 406: The control plane function entity 106 sends a charging serviceestablishment message to the charging function entity 122 through anSBI, to request to establish the SBI charging session for the 4G dataconnection.

Because the SBI charging session is established for the 4G dataconnection, a PGW-C of the control plane function entity 106 sends thecharging service establishment message to the charging function entity122. The SBI charging session established based on the charging serviceestablishment message supports performing online charging and/orperforming offline charging in the 4G data connection. The SBI chargingsession established for the 4G data connection refers to a 4G chargingsession.

The 4G charging session that the control plane function entity 106requests to establish interacts with the charging function entity 122 byusing an SBI message. Therefore, a service provided by the chargingfunction entity 122 is invoked to create and update a charging resource.The charging function entity may complete charging processing on alldata flows of the 4G data connection in one 4G charging session, and thecharging processing includes charging processing such as online chargingand/or offline charging on the data flows.

After determining to send the charging service establishment message tothe charging function entity 122 through the SBI, the control planefunction entity 106 obtains an address of the charging function entity122, and sends the charging service establishment message through theSBI to the charging function entity 122 based on the obtained address torequest to establish the 4G charging session with the charging functionentity 122.

If the control plane function entity 106 determines not to send thecharging function entity 122 the charging service establishment messagethrough the SBI, the control plane function entity 106 obtains anaddress of a 4G online charging system or a 4G offline charging system.The control plane function entity 106 initiates, to the 4G-OCS, arequest for establishing a diameter online charging session for anonline charging data flow in the IP-CAN session, and initiates, to the4G-OFCS, a request for establishing a diameter offline charging sessionfor an offline charging data flow in the IP-CAN session. That thecontrol plane function entity 106 determines not to send the chargingfunction entity 122 the charging service establishment message throughthe SBI may be: The control plane function entity 106 determines thatthe IP-CAN session connection does not need to support interworking, thecontrol plane function entity 106 is not an integrated entity of a PGW-Centity and an SM entity, or others.

In the foregoing optional manner, the control plane function entity 106may obtain the address of the charging function entity 122 in any one ofthe following manners. For example, the control plane function entity106 obtains the address of the charging function entity 122 from a PCCrule, the control plane function entity 106 obtains the address of thecharging function entity 122 from a unified data management entity, orthe control plane function entity 106 obtains the address of thecharging function entity 122 through query from a network repositoryfunction (Network Repository Function, NRF) entity.

Step 408: The charging function entity 122 sends a charging sessionestablishment response message for the 4G data connection (the IP-CANsession) to the control plane function entity 106.

The charging session establishment response message includes a chargingparameter for the 4G data connection (the IP-CAN session connection).The charging parameter for the 4G data connection includes a quotagranted to a rate group in the 4G data connection, a data reportingthreshold, a 4G charging trigger, and the like. The rate group includesone or more rates corresponding to online data (for example, a ratecorresponding to use of an app A, and a rate corresponding to use of anapp B), and/or one or more rates corresponding to offline data (forexample, a rate corresponding to use of an app A, and a ratecorresponding to use of an app B).

Referring to FIG. 6A, the 4G charging trigger includes a 4G onlinecharging trigger and a 4G offline charging trigger. The 4G onlinecharging trigger is used to trigger quota application or quota usagereporting. The 4G online charging trigger may include one or moretriggers, for example, a location change trigger, a QoS change trigger,a 4G online handover trigger, or another trigger. The 4G offlinecharging trigger is used to trigger disabling or reporting of an offlinecharging data record. The 4G offline charging trigger may include one ormore triggers, for example, a location change trigger, a 4G offlinehandover trigger, or another trigger.

Because the charging trigger is obtained by the terminal 114 after theterminal 114 gains access to the 4G network, the charging trigger isreferred to as a 4G charging trigger. A handover trigger of the 4Gonline charging trigger is referred to as the 4G online handover triggerfor short. A handover trigger of the 4G offline charging trigger isreferred to as the 4G offline handover trigger for short. The 4G onlinehandover trigger and the 4G offline handover trigger are collectivelyreferred to as a 4G handover trigger.

A type of the 4G handover trigger is immediate reporting trigger bydefault. The charging function entity 122 may activate the 4G handovertrigger as default immediate reporting, or may specify the 4G handovertrigger as deferred reporting. The charging function entity 122 mayfurther deactivate the 4G handover trigger.

The control plane function entity 106 stores the 4G charging triggerdelivered by the charging function entity 122, and the 4G chargingtrigger includes the 4G online charging trigger and/or the 4G offlinecharging trigger.

Step 410: The control plane function entity 106 requests the chargingfunction entity 122 to perform online charging and/or offline chargingin the 4G data connection (for example, the IP-CAN session).

Specifically, the control plane function entity 106 sends the chargingupdate message of the IP-CAN session to the charging function entitybased on the charging parameter in the charging session response messagefor the 4G data connection (the IP-CAN session).

The charging parameter includes an active charging trigger and othercharging information, such as a quota. The control plane function entity106 monitors the active charging trigger for the 4G data connection, andsends the charging update message of the IP-CAN session to the chargingfunction entity 106 when the 4G charging trigger is satisfied.

After the control plane function entity 106 and the charging functionentity 122 establish the SBI charging session for the 4G data connection(for example, the IP-CAN session connection), the charging functionentity 122 may further deliver the update message to update a type ofthe 4G online handover trigger and/or the 4G offline handover trigger todeferred reporting.

Step 412: The serving gateway 116 sends a network handover request tothe control plane function entity 106, where the network handoverrequest is used to request the terminal 114 to hand over from the 4Gdata connection to the 5G data connection.

After the terminal 114 initiates to hand over from the accessed 4Gnetwork to the 5G network, the serving gateway 116 sends the networkhandover request to the control plane function entity 106. The handoverfrom the 4G network to the 5G network indicates handover from the 4Gdata connection to the 5G data connection in the 5G network, or handoverof a service data flow of the terminal 114 from the 4G data connectionto the 5G data connection in the 5G network.

After the control plane function entity 106 receives the networkhandover request sent by the serving gateway 116, the control planefunction entity 106 performs step 413 of charging processing. For aspecific processing procedure, refer to FIG. 4B.

FIG. 4B is a schematic flowchart of charging processing after a networkhandover request for handling over a 4G data connection to a 5G dataconnection is received according to an embodiment of this application.Step 413 in FIG. 4A includes step 414 and all procedures after step 414in FIG. 4B. The method includes the following steps.

Step 412: A serving gateway 116 sends the network handover request to acontrol plane function entity 106, where the network handover request isused to request a terminal 114 to hand over from the 4G data connectionto the 5G data connection.

Step 414: During handover from the 4G data connection to the 5G dataconnection, the control plane function entity 106 determines whether astate of a 4G handover trigger is an active state. If the 4G handovertrigger is in the active state, step 418 is performed. If the 4Ghandover trigger is not in the active state, step 416 and step 424 areperformed.

The handover from the 4G data connection to the 5G data connection isperformed after the control plane function entity 106 receives thenetwork handover request. The network handover request may be sent tothe control plane function entity 106 by another network entity such asthe serving gateway 116 after the terminal 114 initiates networkhandover.

The state of the 4G handover trigger may be configured on the controlplane function entity 106, or may be obtained by the control planefunction entity 106 from another network entity such as a policy controlentity 104, or may be updated and delivered by a charging functionentity 122.

Step 416: After the handover from the 4G data connection to the 5G dataconnection, the control plane function entity 106 records network usageinformation of the 4G data connection and network usage information ofthe 5G data connection.

That the 4G handover trigger is in an inactive state may be determiningthat there is no active 4G handover trigger. For example, if the 4Ghandover trigger is disabled by the charging function entity 122, the 4Ghandover trigger is in the inactive state.

Further, for the 5G data connection on which online charging isperformed, the control plane function entity 106 continues to use aquota that is applied for the 4G data connection for the 5G dataconnection after the handover. The control plane function entity 106disables a 4G service usage counter, buffers charging information of the4G data connection, and starts to collect charging information of a 5GQoS flow.

Step 418: The control plane function entity 106 determines whether atype of the 4G handover trigger is immediate reporting. If the type ofthe 4G handover trigger is immediate reporting, step 420 is performed;otherwise, step 424 is performed.

The determining that the 4G handover trigger does not need immediatereporting includes that the type of the 4G handover trigger is deferredreporting.

Step 420: The control plane function entity 106 sends a charging updatemessage to the charging function entity 122. The charging update messageis used to report the usage information of the 4G data connectionnetwork. The charging update message is sent through a 4G chargingsession.

The usage information in the 4G network includes 4G data usage, 4Gnetwork usage duration, and/or 4G data connection information (such asQoS and a user location). The 4G data usage includes 4G online chargingdata flow usage and/or 4G offline charging data flow usage.

After determining that the type of the 4G handover trigger is immediatereporting, when the 4G handover trigger is satisfied, the control planefunction entity 106 sends the charging update message to the chargingfunction entity 122 to report the network usage information of the 4Gdata connection. Generally, after receiving the network handoverrequest, the control plane function entity 106 determines that the 4Ghandover trigger is satisfied. The 4G charging trigger may bepreconfigured in the control plane function entity 106, or may be a 4Gcharging trigger carried in the update message delivered by the chargingfunction entity 122.

Step 422: The control plane function entity 106 receives a chargingupdate response message sent by the charging function entity 122.

After the control plane function entity 106 determines that the type ofthe 4G handover trigger is immediate reporting, and reports the usageinformation of the 4G network of a rate group corresponding to the 4Ghandover trigger, the charging function entity 122 re-delivers a 5Gcharging trigger for the 4G handover trigger. The control plane functionentity 106 uses the 5G charging trigger for the 5G network. For contentincluded in the 5G charging trigger, refer to FIG. 6B.

The charging update response message includes the 5G charging trigger, aquota for 5G network access, and/or the like.

Step 424: The control plane function entity 106 stops the count of theusage information of the 4G data connection in the 4G network, andstarting a new count of the usage information of the 5G data connectionin the 5G network.

For example, the control plane function entity 106 disables the serviceusage counter and buffers the network usage information of the IP-CANsession connection of the terminal 114 in the 4G network, and starts torecord the network usage information of the quota in the 5G network byusing a new service usage counter. For the data flow on which the onlinecharging is performed, the control plane function entity 106 continuesto use the quota applied for the 4G data connection for the 5G dataconnection of the terminal 114.

Step 426: The control plane function entity 106 determines whether the5G network supports the active 4G charging trigger for the 4G dataconnection. If the 5G network supports the activated 4G charging triggerfor the 4G data connection, step 428 is performed; otherwise, step 430is performed.

That the control plane function entity 106 determines whether to supportthe active 4G charging trigger for the 4G data connection includes: Thecontrol plane function entity 106 determines that the 5G chargingtrigger includes the 4G charging trigger; or the control plane functionentity 106 determines whether the 5G charging trigger may be mapped tothe 4G charging trigger. If the 5G charging trigger includes the 4Gcharging trigger, or the 5G charging trigger may be mapped to the 4Gcharging trigger, the 5G network supports the active 4G charging triggerfor the 4G data connection.

The control plane function entity 106 may determine, based on a chargingtrigger mapping table shown in FIG. 4D, whether the active 4G chargingtrigger for the 4G data connection may be mapped to the 5G chargingtrigger. The charging trigger mapping table may be preconfigured in thecontrol plane function entity 106, or may be obtained by the controlplane function entity 106 from another network entity. For example, thecontrol plane function entity 106 obtains the charging trigger mappingtable from a policy control entity 106, or obtains the charging triggermapping table from the charging function entity 122.

FIG. 4D is a charging trigger mapping table in which a 5G chargingtrigger is mapped to a 4G charging trigger. The mapping table lists a 5Gcharging trigger and a 4G charging trigger that can be mapped. In anexample, if a 4G charging trigger value CHANGE_IN_SERVING_NODE may bemapped to a 5G charging trigger value SERVING_NODE_CHANGE, the 5Gcharging trigger may be mapped to the 4G charging trigger.

It should be noted that the 5G charging trigger and the 4G chargingtrigger that can be mapped and that are listed in FIG. 4D are merelyexamples. FIG. 4D may further include another 5G charging trigger valuethat can be mapped to another 4G charging trigger value.

Step 428: The control plane function entity 106 requests to performcharging by using the 4G charging trigger or the mapped 5G chargingtrigger.

If the 5G network includes the 4G charging trigger, the control planefunction entity 106 continues to use the 4G charging trigger for the 5Gdata connection.

If the control plane function entity 106 determines that the 5G chargingtrigger may be mapped to the 4G charging trigger, the control planefunction entity 106 uses the mapped 5G charging trigger for the 5G dataconnection.

Step 430: The control plane function entity 106 ignores, in the 5G dataconnection, the 4G charging trigger.

If the control plane function entity 106 determines that the 5G networkdoes not include the 4G charging trigger, and the 5G charging triggercannot be mapped to the 4G charging trigger, the control plane functionentity 106 ignores, in the 5G data connection, the 4G charging trigger.

It should be noted that, in the foregoing method, steps 416 and 418 areselectively performed based on the active state and the type of the 4Ghandover trigger, but have no sequence. There is no sequence betweenstep 416 and step 426, and between step 424 and step 426.

In this embodiment of this application, the control plane functionentity 106 requests the charging function entity 122 to establish theSBI charging session for the 4G data connection (for example, the IP-CANsession connection) of the terminal 114 in the 4G network. The SBIcharging session may support performing the online charging in the 4Gdata connection, and support performing the offline charging in the 4Gdata connection. In this way, when the handover is performed on a dataconnection, the charging session remains unchanged. The control planefunction entity 106 may perform, based on a charging requirement of thecharging function entity, corresponding charging processing on the 5Gdata connection after the handover, to ensure charging continuity andaccuracy in a process in which the terminal 114 is handed over from the4G network to the 5G network, and improve service experience of a user.

FIG. 4C is a schematic diagram of performing, by a control planefunction entity 106, the step 404, in FIG. 4A, of determining to requestthe charging function entity 122 to establish the SBI charging sessionfor the 4G data connection according to an embodiment of the presentdisclosure. As shown in FIG. 4C, the control plane function entity 106may determine to request the charging function entity 122 to establishthe SBI charging session in the following five optional methods.

Optional Method 1:

The control plane function entity 106 determines that the IP-CAN sessionneeds a network system to support handover of the terminal 114 from the4G network to the 5G network. The control plane function entity 106determines to request to establish the SBI charging session for the 4Gdata connection.

That the control plane function entity 106 determines that the IP-CANsession needs the network system to support the handover of the terminal114 from the 4G network to the 5G network includes: Based on a 5G systeminterworking indication parameter in the request for establishing the 4Gdata connection, the control plane function entity 106 determines thatthe terminal 114 supports gaining access to the 5G network, and/ordetermines that the 5G system interworking indication (5GS InterworkingIndication) parameter allows the terminal 114 to be handed over to the5G network. For example, if the 5G system interworking indicationparameter indicates that the terminal 114 supports an N1 mode, it may bedetermined that the terminal 114 supports gaining access to the 5Gnetwork. The 5G system interworking indication parameter may bedifferent values of one parameter to indicate that the terminal 114supports gaining access to the 5G network and/or allow the terminal 114to be handed over to the 5G network.

In another optional manner in the optional method 1, the control planefunction entity 106 may further determine, based on user information, toallow the terminal 114 of the user to be handed over between the 4Gnetwork and the 5G network. The control plane function entity 106 mayobtain the user information from a home subscriber server, a userinformation library (Subscription Profile Repository, SPR), or a userdata repository (User Data Repository, UDR).

Optional method 2: After receiving the request for establishing theIP-CAN session, if the control plane function entity 106 determines tocommunicate with the policy function entity 104 through an SBI message,the control plane function entity 106 determines to request to establishthe SBI charging session for the 4G data connection. For example, thecontrol plane function entity 106 initiates a policy control session tothe policy function entity 104 through the SBI message. If the controlplane function entity 106 does not use the SBI message to initiate thepolicy control session to the policy function entity 104, the controlplane function entity 106 initiates a request for establishing an Rocharging session or a request for establishing an Rf charging session toa 4G online charging system (4G online charging system, 4G OCS) or a 4Goffline charging system (4G offline charging system, 4G-OFCS)respectively.

Optional method 3: The control plane function entity 106 determines,based on a parameter in a policy and charging control rule (policy andcharging control rule, PCC rule) delivered (installed) by a policyfunction entity 104, to request the charging function entity 122 toestablish the SBI charging session for the 4G data connection.Alternatively, the control plane function entity 106 determines, basedon a parameter in a PCC rule that is configured and activated by apolicy function entity 104, to request the charging function entity 122to establish the SBI charging session for the 4G data connection. Forexample, the control plane function entity 106 determines, based onindication information, for sending a service charging establishmentmessage to the charging function entity 122, included in the PCC rule,or an address, of the charging function entity 106, included in the PCCrule, to request the charging function entity 122 to establish the SBIcharging session. If the PCC rule includes an address of the 4G onlinecharging system entity or an address of the 4G offline charging system,the control plane function entity 106 initiates a request forestablishing an Ro charging session or a request for establishing an Rfcharging session to the 4G online charging system or the 4G offlinecharging system entity by using a diameter respectively.

When the optional method 3 is performed, the control plane functionentity 106 determines, based on a data type of the address included inthe PCC rule, whether the address is an address of the charging functionentity 122. For example, if the address included in the PCC rule isdefined in a domain name manner, for example, http://domain:port, theaddress is the address of the charging function entity 106.

Optional method 4: When the control plane function entity 106re-establishes a charging session for an established IP-CAN sessionconnection, the control plane function entity 106 determines, based onthat a previous charging session of the IP-CAN session is a chargingsession established with the charging function entity 122, to requestthe charging function entity to establish the SBI charging session. Forexample, the control plane function entity 106 determines, based on ausage parameter (for example, an address, an interface, and a chargingfunction entity that are used by the charging session) of a previouslyestablished charging session, that the previous charging session of the4G data connection is the charging session established with the chargingfunction entity.

Optional method 5: If the control plane function entity 106 determinesthat the control plane function entity 106 includes the PGW-C functionand the SMF function, the control plane function entity 106 determinesto request to establish SBI charging sessions for all IP-CAN sessionconnections.

The foregoing optional methods may be used independently, or may be usedin combination to determine whether to establish the session with thecharging function entity 122 for the terminal 114. For example, theoptional method 1 and the optional method 5 are used together. Inaddition, there is no priority relationship between the foregoingoptional methods. A system may configure which method is used by thecontrol plane function entity 106 during determining. If configurationof the system is determined, the control plane function entity 106performs determining in a method configured by the system.

The foregoing optional methods provide sufficient flexibility for thecontrol plane function entity 106 to determine to request to establishthe SBI charging session. The foregoing optional methods can be used inmore application scenarios to meet service requirements.

FIG. 5A is a schematic flowchart of a charging method when a terminal114 is handed over from a 5G network to a 4G network according to anembodiment of this application. In this embodiment, the terminal 114first gains access to the 5G network by using an NG-RAN device 112, andestablishes a protocol data unit session (Protocol Data Unit, PDUsession) connection in the 5G network. Subsequently, the terminal 114gains access to the 4G network by using an E-UTAN device 120 because alocation of the terminal 114 moves to a 4G service range, a signal ofthe 4G network is stronger than a signal of the 5G network at alocation, or a user actively selects to use the 4G network. The methodincludes the following steps.

Step 502: A mobility management function entity 110 initiates a requestfor establishing a 5G data connection to a control plane function entity106. A session management function of the control plane function entity106 receives from the mobility management function entity 110, therequest for establishing the 5G data connection, to request to establishthe 5G data connection for the terminal 114. The 5G data connection maybe a PDU session connection.

The mobility management function entity 110 may initiate the request forestablishing the 5G data connection to the control plane function entity106 after the terminal 114 initiates establishment of the 5G dataconnection. The PDU session connection may be established by theterminal 114 in an attach process, or may be established by the terminal114 after the terminal 114 is attached. For a process of establishingthe PDU session connection, refer to an existing protocol (for example,3GPP TS 23.501). Details are not described herein.

Step 504: The control plane function entity 106 requests a chargingfunction entity 122 to establish an SBI charging session for the 5G dataconnection. The 5G data connection may be a 5G data connection that isbeing established, or an established 5G data connection.

The control plane function entity 106 sends a charging serviceestablishment message to the charging function entity 122 through aservice-based interface (service based interface, SBI), to request toestablish a 5G charging session for the 5G data connection. The 5Gcharging session is a charging session established for the 5G dataconnection.

The control plane function entity 106 establishes the 5G chargingsession for the PDU session after receiving the request, forestablishing the PDU session, sent by the mobility management functionentity 110 or within a life cycle of the PDU session. In the life cycleof the PDU session, the 5G charging session may be released. When thePDU session connection has a data flow that needs to be charged, and thecontrol plane function entity 106 needs to re-establish a chargingsession, step 504 is performed.

The control plane function entity 106 obtains an address of the chargingfunction entity 122, and sends the charging service establishmentmessage to the charging function entity 122 based on the obtainedaddress, to request to establish the charging session.

After receiving the request, for establishing the PDU session, sent bythe mobility management function entity 110, the control plane functionentity 106 obtains a policy and charging control rule (policy andcharging control rule, PCC rule) from a policy control entity 104. ThePCC rule includes address information of the charging function entity122. In another possible manner, the control plane function entity 106obtains the address of the charging function entity 122 based on acharging characteristic (charging characteristic) parameter included inthe request for establishing the PDU session. The charging serviceestablishment message carries an online charging parameter and/or anoffline charging parameter.

Step 506: The charging function entity 122 sends a charging sessionestablishment response message for the 5G data connection (the PDUsession) to the control plane function entity 106.

The charging session establishment response message carries a chargingparameter for the PDU session connection. The charging parameter for the5G data connection includes a 5G charging trigger granted to a rategroup in the 5G data connection, for example, a quota granted to therate group in the 5G data connection or a data reporting threshold.

Referring to FIG. 6B, the 5G charging trigger includes a 5G onlinecharging trigger and a 5G offline charging trigger. The 5G onlinecharging trigger is used to trigger quota application or quota usagereporting. The 5G online charging trigger may include one or moretriggers, for example, a location change trigger, a QoS change trigger,a 5G online handover trigger, or another trigger. The 5G offlinecharging trigger is used to trigger disabling or reporting of an offlinecharging data record. The 5G offline charging trigger may include one ormore triggers, for example, a location change trigger, a 5G offlinehandover trigger, a 5G offline reporting threshold trigger, and/oranother trigger.

The 5G charging trigger is a charging trigger of the 5G data connectionafter the terminal 114 gains access to the 5G network. A handovertrigger of the 5G online charging trigger is referred to as the 5Gonline handover trigger for short. A handover trigger of the 5G offlinecharging trigger is referred to as the 5G offline handover trigger forshort. The 5G online handover trigger and the 5G offline handovertrigger are collectively referred to as a 5G handover trigger. In otherwords, the 5G handover trigger includes the 5G online handover triggerand/or the 5G offline handover trigger.

The 5G charging trigger may be preconfigured in the control planefunction entity 106, or may be an update 5G charging trigger carried ina trigger update message delivered by the charging function entity 122.The control plane function entity 106 may obtain the 5G online chargingtrigger and/or the 5G offline charging trigger, of the PDU connection,delivered by the charging function entity 122.

Step 508: The control plane function entity 106 requests the chargingfunction entity 122 to perform online charging and/or offline chargingin the 5G data connection (for example, the PDU session).

For example, the control plane function entity 106 monitors an activecharging trigger, and sends a charging update message of the PDU sessionto the charging function entity 106 when the 5G charging trigger issatisfied. The charging function entity 122 performs the online chargingand/or the offline charging on the PDU session based on the chargingupdate message of the PDU session.

Further, after the control plane function entity 106 establishes the 5Gcharging session with the charging function entity 122, the chargingfunction entity 122 may deliver an update message to update a type ofthe 5G online handover trigger and/or a type of the 5G offline handovertrigger in the control plane function entity 106 to deferred reporting.

Step 510: The mobility management entity 110 sends a network handoverrequest to the control plane function entity 106, where the networkhandover request is used to request the terminal 114 to hand over fromthe 5G data connection to the 4G data connection.

After the terminal 114 initiates the handover from the accessed 5Gnetwork to the 4G network, the mobility management entity 110 initiatesthe network handover to the control plane function entity 106. Thehandover from the 5G network to the 4G network indicates handover fromthe 5G data connection to the 4G data connection in the 4G network, orhandover of a service data flow of the terminal 114 from the 5G dataconnection to the 4G data connection in the 4G network.

After the control plane function entity receives the network handoverrequest sent by the mobility management entity 110, the control planefunction entity 106 performs step 511 of charging processing. For aspecific processing procedure, refer to FIG. 5B.

FIG. 5B is a schematic flowchart of charging processing after a networkhandover request for handling over a 5G data connection to a 4G dataconnection is received according to an embodiment of this application.Step 511 in FIG. 5A includes step 512 and all procedures after step 512in FIG. 5B. The method includes the following steps.

Step 510: A mobility management entity 110 sends a network handoverrequest to a control plane function entity 106, where the networkhandover request is used to request a terminal 114 to hand over from the5G data connection to the 4G data connection.

After receiving the network handover request, the control plane functionentity 106 performs the handover from the 5G data connection to the 4Gdata connection, for example, determines a type and a state of a 5Ghandover trigger, and/or requests to perform charging processing for the5G data connection.

Step 512: During handover from the 5G data connection to the 4G dataconnection, the control plane function entity 106 determines whether astate of a 5G handover trigger is an active state. If the 5G handovertrigger is in the active state, step 516 is performed. If the 4Ghandover trigger is not in the active state, step 514 and step 524 areperformed.

The handover from the 5G data connection to the 4G data connection isperformed after the control plane function entity 106 receives thenetwork handover request. The network handover request may be sent tothe control plane function entity 106 by another network entity such asthe mobility management entity 110 after the terminal 114 initiates thenetwork handover. During the handover from the 5G data connection to the4G data connection, the control plane function entity 106 performs thehandover from the 5G data connection to the 4G data connection. Forexample, the control plane function entity 106 obtains a 4G chargingparameter after the handover, and/or applies for a 4G online chargingquota.

The state of the 5G handover trigger may be configured on the controlplane function entity 106, or may be obtained by the control planefunction entity 106 from another network entity such as a policy controlentity 104, or may be updated and delivered by a charging functionentity 122.

Step 514: After the handover from the 5G data connection to the 4G dataconnection, the control plane function entity 106 records network usageinformation of the 5G data connection and network usage information ofthe 4G data connection.

For example, the control plane function entity 106 records the usageinformation of a 4G online charging data flow and/or a 4G offlinecharging data flow in the 4G network with the usage information of a 5Gonline charging data flow and/or a 5G offline charging data flow in the5G network. For a data flow on which online charging is performed, thecontrol plane function entity 106 continues to use a quota requested forthe 5G data connection for the terminal 114. The control plane functionentity 106 disables a service usage counter of a QoS flow, bufferscharging information of the QoS flow of the 5G data connection, andstarts to collect charging information of a 4G bearer.

That the 5G handover trigger is in the inactive state may further bethat the control plane function entity 106 determines that there is noactive 5G handover trigger. For example, if the 5G handover trigger isdisabled by the charging function entity 122, the 5G handover trigger isin the inactive state.

Step 516: The control plane function entity 106 determines whether atype of the 4G handover trigger is immediate reporting. If the type ofthe 4G handover trigger is immediate reporting, step 518 is performed;otherwise, step 522 is performed.

The determining that the 4G handover trigger does not need immediatereporting includes that the type of the 4G handover trigger is deferredreporting.

Step 518: The control plane function entity 106 sends a charging updatemessage to the charging function entity 122. The charging update messageis used to report network usage information of the PDU sessionconnection of the terminal 114 in a 5G network access process.

The network usage information includes 5G data usage, 5G network useduration, and/or the like. The 5G data usage includes 5G online chargingdata flow usage and/or 5G offline charging data flow usage. The chargingupdate message is sent through a 5G charging session.

Further, after the control plane function entity 106 determines that thetype of the 5G handover trigger is immediate reporting, the controlplane function entity 106 reports 5G network usage information of a rategroup corresponding to the 5G handover trigger. The 4G charging triggerincludes a 4G online charging trigger and/or a 4G offline chargingtrigger. The 5G handover trigger includes the 5G online handover triggerand/or the 5G offline handover trigger.

Step 520: The control plane function entity 106 receives a chargingupdate response message sent by the charging function entity 122.

The charging update response message includes the update 4G chargingtrigger, a quota for 4G network access, and/or the like. The chargingfunction entity 122 re-delivers the 4G charging trigger for the rategroup corresponding to the 5G handover trigger. The control planefunction entity 106 uses, in the 4G network, the 4G charging triggerredelivered by the charging function entity 122.

Step 522: The control plane function entity 106 stops the count theusage information of the 5G data connection in the 5G network, andre-records the usage information of the 4G data connection in the 4Gnetwork.

Specifically, the control plane function entity 106 disables the serviceusage counter and buffers the network usage information of the PDUsession connection of the terminal 114 in the 5G network, and starts torecord the network usage information of the quota in the 4G network byusing a new service usage counter. For the data flow on which the onlinecharging is performed, the control plane function entity 106 continuesto use the quota requested for the 5G connection for the 4G dataconnection of the terminal 114.

Step 524: The control plane function entity 106 determines whether the4G network supports the active 5G charging trigger for the 5G dataconnection. If the 4G network supports the activated 5G charging triggerfor the 5G data connection, step 526 is performed; otherwise, step 528is performed.

That the control plane function entity 106 determines whether to supportthe active 5G charging trigger for the 5G data connection includes: Thecontrol plane function entity 106 determines that the 4G chargingtrigger includes the 5G charging trigger; or the control plane functionentity 106 determines whether the 4G charging trigger may be mapped tothe 5G charging trigger. If the 4G charging trigger includes the 5Gcharging trigger, or the 4G charging trigger may be mapped to the 5Gcharging trigger, the 4G network supports, in the 5G data connection,the active 4G charging trigger.

The control plane function entity 106 may determine, based on a chargingtrigger mapping table shown in FIG. 4D, whether the active 5G chargingtrigger for the 5G data connection may be mapped to the 4G chargingtrigger. The charging trigger mapping table may be preconfigured in thecontrol plane function entity 106, or may be obtained by the controlplane function entity 106 from another network entity. For example, thecontrol plane function entity 106 obtains the charging trigger mappingtable from a policy control entity 106, or obtains the charging triggermapping table from the charging function entity 122

Step 526: The control plane function entity 106 requests to performcharging by using the 5G charging trigger or the mapped 4G chargingtrigger.

If the 4G network includes the 5G charging trigger, the control planefunction entity 106 continues to use, in the 4G data connection, the 5Gcharging trigger. If the control plane function entity 106 determinesthat the 4G charging trigger may be mapped to the 5G charging trigger,the control plane function entity 106 uses the mapped 4G chargingtrigger for the 4G data connection.

Step 528: The control plane function entity 106 ignores, in the 4G dataconnection, the 5G charging trigger.

If the control plane function entity determines that the 4G network doesnot include the 5G charging trigger, and the 4G charging trigger cannotbe mapped to the 5G charging trigger, the control plane function entity106 ignores, in the 4G data connection, the 5G charging trigger.

In another optional manner, during the handover from the 5G dataconnection to the 4G data connection, that is, when step 512 is beingperformed, the control plane function entity 106 further determineswhether to support processing on a type of the 5G charging trigger forthe 4G network. If the processing on the type of the 5G charging triggeris supported, the type of the 5G charging trigger remains unchanged. Ifthe processing on the type of the 5G charging trigger is not supported,the control plane function entity 106 configures the type of thecharging trigger as immediate reporting.

For example, the control plane function entity 106 determines thatpasses of an online charging data flow is not supported in the 4Gnetwork before a quota granted by the charging function entity 106 isobtained, and the control plane entity 106 passes the online chargingdata flow after receiving the quota granted by the charging functionentity 122. For example, when the terminal 114 gains access to a 5Gnetwork, a PCC rule delivered or activated by a policy control entity104 indicates that a non-blocking manner is used for some service dataflows.

After the handover to the 4G data connection, if a PGW-C in the 4Gnetwork supports the non-blocking manner, the control plane functionentity 106 processes, based on the non-blocking manner specified in thePCC rule, quota application and data flow passes. If the PGW-C in the 4Gnetwork does not support passing the data flow (namely, does not supportthe non-blocking manner) before obtaining the quota granted by thecharging function entity, the control plane entity 106 passes the dataflow after receiving the quota granted by the charging function entity122. The non-blocking manner is passing the data flow when there is noquota.

It should be noted that, in the foregoing method, step 514, step 522,step 524, and step 518 are selectively performed based on the activestate and the type of the 5G handover trigger, and do not indicate thatthe steps are performed in sequence.

In this embodiment, the control plane function entity 106 establishes,in the 5G network, the SBI charging session for the 5G data connectionof the terminal 114, and performs charging on network usage of the 4Gdata connection after the handover. There is no need to re-establish acharging session for the 4G data connection of the terminal 114 afterthe terminal 114 is handed over to the 4G network, thereby simplifying anetwork handover and charging procedure. Further, in this embodiment,after the terminal 114 is handed over from the 5G data connection to the4G data connection, targeted processing is performed on differentcharging parameters (for example, the quota, the trigger, and thecharging parameter), so that in a process of the handover from the 5Gdata connection to the 4G data connection, charging continuity andaccuracy can be ensured and user experience is improved.

The foregoing mainly describes the solutions provided in the embodimentsof this application from a perspective of interaction between networkelements. It may be understood that to implement the foregoingfunctions, the foregoing terminal, the AMF, and the control planefunction entity include corresponding hardware structures and/orsoftware modules for performing the functions. A person skilled in theart should easily be aware that, in combination with units and algorithmsteps of the examples described in the embodiments disclosed in thisspecification, this application may be implemented by hardware or acombination of hardware and computer software. Whether a function isperformed by hardware or hardware driven by computer software depends onparticular applications and design constraints of the technicalsolutions. A person skilled in the art may use different methods toimplement the described functions for each particular application, butit should not be considered that the implementation goes beyond thescope of this application.

In the embodiments of this application, the devices such as the terminal114 and the control plane function entity 106 may be divided intofunction modules based on the foregoing method examples. For example,each function module may be obtained through division based on eachcorresponding function, or two or more functions may be integrated intoone processing module. The integrated module may be implemented in aform of hardware, or may be implemented in a form of a softwarefunctional module. It should be noted that, in this embodiment of thisapplication, division into modules is an example, and is merely alogical function division. In actual implementation, another divisionmanner may be used.

For example, when the function modules are obtained through division inan integrated manner, FIG. 7 is a schematic diagram of a structure of anapparatus 700. The apparatus 700 may be the charging function entity 122in the foregoing embodiments, or may be a chip in the charging functionentity 122. This is not specifically limited in this embodiment of thisapplication. As shown in FIG. 7, the apparatus includes a receivingmodule 701, a processing module 702, and a sending module 703.

The receiving module 701 is configured to receive a charging serviceestablishment message sent by a control plane function entity 106. Thecharging service establishment message is used to request to establish acharging session for a first network data connection. The sending module703 is configured to send a charging session response message for thefirst network data connection to the control plane function entity 106.The receiving module 701 is further configured to receive, through thecharging session, a charging session update message sent by the controlplane function entity 106. The charging session update message carriesan identifier of a second network data connection and network usageinformation of the first network data connection. The processing module702 is configured to: after a terminal 114 is handed over from anaccessed first network to a second network, charge, by using thecharging session, the second network data connection established for theterminal 114.

Optionally, when the first network is a 4G network, and the secondnetwork is a 5G network, the receiving module 701 in the apparatus inFIG. 7 may be further configured to perform any receiving step performedby the charging function entity 122 in the method procedures in FIG. 3A,FIG. 3C and FIG. 4A to FIG. 4D. The processing module 702 in theapparatus in FIG. 7 may be further configured to perform processingsteps performed by the charging function entity 122 in the methodprocedures in FIG. 3A, FIG. 3C, and FIG. 4A to FIG. 4D. The sendingmodule 703 in the apparatus in FIG. 7 may be further configured toperform sending steps performed by the charging function entity 122 inthe method procedures in FIG. 3A, FIG. 3C, and FIG. 4A to FIG. 4D.

Optionally, when the first network is a 5G network, and the secondnetwork is a 4G network, the receiving module 701 in the apparatus inFIG. 7 may be further configured to perform receiving steps performed bythe charging function entity 122 in the method procedures in FIG. 3B,and FIG. 5A and FIG. 5B. The sending module 703 in the apparatus in FIG.7 may be further configured to perform sending steps performed by thecharging function entity 122 in the method procedures in FIG. 3B, andFIG. 5A and FIG. 5B. The processing module 702 in the apparatus in FIG.7 may be further configured to perform processing steps performed by thecharging function entity 122 in the method procedures in FIG. 3B, andFIG. 5A and FIG. 5B.

In another optional manner, the receiving module 701 in the apparatus700 is configured to receive a charging service establishment messagesent by a control plane function entity 106 through an SBI. The chargingservice establishment message sent through the SBI is used to request toestablish, for a 4G data connection, an SBI charging session supportingperforming online charging and offline charging in the 4G dataconnection. The sending module 703 in the apparatus 700 is configured tosend a charging session response message for the 4G data connection tothe control plane function entity 106. The charging session responsemessage includes a 4G charging trigger for the 4G network.

Optionally, the receiving module 701 in the apparatus 700 is furtherconfigured to receive a charging session update message through the SBIcharging session. The charging session update message carries anidentifier of a 5G data connection after handover.

Optionally, the charging session update message carries usage of the 4Gdata connection in the 4G network and/or a quota request for the 5G dataconnection in the 5G network. The processing module 702 charges theusage of the 4G data connection in the 4G network based on the chargingsession update message; and/or the processing module 702 grants apre-quota to the 5G data connection in the 5G network.

FIG. 8A is a schematic diagram of a structure of an apparatus 800. Theapparatus 800 may be the control plane function entity 106 in theforegoing embodiments, or may be a chip in the control plane functionentity 106. This is not specifically limited in this embodiment of thisapplication. As shown in FIG. 8A, the apparatus includes a receivingmodule 801, a determining module 802, a processing module 803, and asending module 804. The determining module 802 is configured todetermine to request a charging function entity 122 to establish aservice-based interface SBI charging session for a 4G data connection.The sending module 804 is configured to request, through the SBIcharging session, to perform online charging and/or offline charging inthe 4G data connection.

Optionally, the control plane function entity 106 includes a packet datanetwork gateway control plane function. The determining module 802 isfurther configured to determine that the control plane function entity106 further includes a session management function. The determiningmodule 802 determines that a policy and charging control rule PCC ruleincludes indication of requesting the charging function entity toestablish the SBI charging session, or includes: an address of acharging system designated for the 4G data connection is an address ofthe charging function entity 122 using the SBI. The determining module802 determines that a previous charging session of the 4G dataconnection is the SBI charging session established with the chargingfunction entity 122. Alternatively, the control plane function entity106 determines to communicate with a policy function entity through theSBI message.

Optionally, the control plane function entity 106 includes a packet datanetwork gateway control plane function. That the determining module 802determines to request the charging function entity 122 to establish theSBI charging session includes: The determining module 802 determinesthat the control plane function entity 106 further includes a sessionmanagement function, and determines that a terminal needs to supporthandover from a 4G network to a 5G network.

Optionally, the apparatus further includes the receiving module 801,configured to receive a request for establishing the 4G data connection.The determining module 802 is further configured to determine, based ona 5G system interworking indication parameter in the request forestablishing the 4G data connection, that the terminal 114 supportsgaining access to the 5G network and/or to allow the 4G data connectionto interwork with the 5G network.

Optionally, the apparatus further includes the receiving module 801,configured to receive a request for establishing the 4G data connection.The apparatus includes a packet data network gateway control planefunction. The determining module 802 is specifically configured todetermine that the control plane function entity 106 further includes asession management function; and the determining module 802 determines,based on a 5G system interworking indication parameter in the requestfor establishing the 4G data connection, that the terminal 114 supportsgaining access to the 5G network and/or to allow the 4G data connectionto interwork with the 5G network.

Optionally, during handover from the 4G data connection to a 5G dataconnection, the determining module 802 is further configured todetermine that a 4G handover trigger is in an active state and a type ofthe 4G handover trigger is an immediate reporting trigger. The sendingmodule 804 is further configured to send a charging update message tothe charging function entity through the SBI charging session. Thecharging update message includes network usage information of the 4Gdata connection and/or a quota request for the 5G data connection afterthe handover.

Optionally, during handover from the 4G data connection to a 5G dataconnection, the determining module 802 is further configured todetermine that a 4G handover trigger is in an active state and that atype of the 4G handover trigger is a deferred reporting trigger. Theprocessing module is 803 is configured to stop the count network usageinformation of the 4G data connection, and start a new count of networkusage information of the 5G data connection after the handover.

Optionally, during handover from the 4G data connection to a 5G dataconnection, the determining module 802 is further configured todetermine that there is no active 4G handover trigger after receiving anetwork handover request for the 4G data connection. The processingmodule 803 is configured to record network usage information of the 4Gdata connection and network usage information of the 5G data connectionafter the handover.

Optionally, the processing module 803 is configured to use, for the 5Gdata connection in the 5G network, a quota obtained for the 4G dataconnection.

Optionally, the processing module 803 is configured to process anactivated 4G charging trigger for the 4G data connection.

Optionally, the determining module 802 is further configured todetermine that the 5G network after handover does not support theactivated 4G charging trigger for the 4G data connection, and thecontrol plane function entity 106 ignores, in the 5G data connectionafter the handover, the 4G charging trigger.

Optionally, the determining module 802 is further configured todetermine that the 5G network after handover supports the activated 4Gcharging trigger for the 4G data connection, and the control planefunction entity 106 uses, in the 5G data connection after the handover,the 4G charging trigger.

Optionally, the processing module 803 is further configured to map theactivated 4G charging trigger for the 4G data connection to a 5Gcharging trigger for the 5G network, and use the mapped 5G chargingtrigger for the 5G data connection after the handover.

In another optional manner, the modules in the apparatus in FIG. 8A maybe further configured to perform steps performed by the control planefunction entity 106 in the method procedures in FIG. 3A, FIG. 3C, andFIG. 4A to FIG. 4D.

FIG. 8B is a schematic diagram of a structure of an apparatus 850. Theapparatus 850 may be the control plane function entity 106 in theforegoing embodiments, or may be a chip in the control plane functionentity 106. This is not specifically limited in this embodiment of thisapplication. As shown in FIG. 8B, the apparatus includes a receivingmodule 851, a determining module 852, a processing module 853, and asending module 854.

The sending module 854 is configured to send a charging serviceestablishment message for a first network data connection to a chargingfunction entity, to request to establish a charging session for thefirst network data connection. The processing module 853 is configuredto request to perform, by using the charging session, online chargingand/or offline charging on network usage information of the firstnetwork data connection. After handover from the first network dataconnection to a second network data connection, the processing module853 is further configured to perform, by using the charging session, theonline charging and/or the offline charging in the second network dataconnection established for a terminal 114.

Specifically, the receiving module 851 in the apparatus in FIG. 8B maybe further configured to perform receiving steps performed by thecontrol plane function entity 106 in the method procedures in FIG. 3A,FIG. 3B, FIG. 3C, and FIG. 5A and FIG. 5B. The determining module 852 inthe apparatus in FIG. 8B may be further configured to performdetermining steps performed by the control plane function entity 106 inthe method procedures in FIG. 3B and FIG. 5A and FIG. 5B, for example,step 504, step 512, and/or step 520. The sending module 854 in theapparatus in FIG. 8B may be further configured to perform sending stepsperformed by the control plane function entity 106 in the methodprocedures in FIG. 3A, FIG. 3B, and FIG. 5A and FIG. 5B, for example,step 506, and/or step 514. The processing module 853 in the apparatus inFIG. 8B may be further configured to perform processing steps performedby the control plane function entity 106 in the method procedures inFIG. 3B, and FIG. 5A and FIG. 5B.

In another optional manner, the receiving module 851 is configured toreceive a request for establishing the first network data connection forthe terminal. The sending module sends a charging service establishmentmessage to a charging function entity 122 to request to establish thecharging session for the first network data connection. The processingmodule requests to perform the online charging and/or the offlinecharging in the first network data connection in the charging session,and is configured to: after the terminal 114 is handed over from theaccessed first network to a second network, request to perform, by usingthe charging session, online charging and/or offline charging in thesecond network data connection established for the terminal 114.

Specifically, when the first network is a 5G network, and the secondnetwork is a 4G network, the receiving module 851 in the apparatus inFIG. 8B may be further configured to perform the receiving stepsperformed by the control plane function entity 106 in the methodprocedures in FIG. 3A, FIG. 3B, and FIG. 5A and FIG. 5B. The determiningmodule 852 in the apparatus in FIG. 8B may be further configured toperform the determining steps performed by the control plane functionentity 106 in the method procedures in FIG. 3A, FIG. 3B, and FIG. 5A andFIG. 5B, for example, step 512 and/or step 516. The sending module 854in the apparatus in FIG. 8B may be further configured to perform sendingsteps performed by the control plane function entity 106 in the methodprocedures in FIG. 3A, FIG. 3B, and FIG. 5A and FIG. 5B. The processingmodule 853 in the apparatus in FIG. 8B may be further configured toperform the processing steps performed by the control plane functionentity 106 in the method procedures in FIG. 3A, FIG. 3B, and FIG. 5A andFIG. 5B.

Specifically, when the first network is a 4G network, and the secondnetwork is a 5G network, the receiving module 851 in the apparatus inFIG. 8B may be further configured to perform the receiving stepsperformed by the control plane function entity 106 in the methodprocedures in FIG. 3A, FIG. 3B, and FIG. 4A to FIG. 4D. The determiningmodule 852 in the apparatus in FIG. 8B may be further configured toperform the determining steps performed by the control plane functionentity 106 in the method procedures in FIG. 3A, FIG. 3B, and FIG. 4A toFIG. 4C. The sending module 854 in the apparatus in FIG. 8B may befurther configured to perform the sending steps performed by the controlplane function entity 106 in the method procedures in FIG. 3A, FIG. 3B,and FIG. 4A to FIG. 4D. The processing module 853 in the apparatus inFIG. 8B may be further configured to perform the processing stepsperformed by the control plane function entity 106 in the methodprocedures in FIG. 3A, FIG. 3B, and FIG. 4A to FIG. 4C.

In this embodiment, the apparatus 800, 850 and/or 700 are presented in aform of function modules obtained through division in an integratedmanner. The “module” herein may be an application-specific integratedcircuit (application-specific integrated circuit, ASIC), a circuit, aprocessor and a memory for executing one or more software or firmwareprograms, an integrated logic circuit, and/or another device that canprovide the foregoing function. In a simple embodiment, a person skilledin the art may figure out that the apparatus 800, 850 and/or 700 may usea form shown in FIG. 2.

For example, the processor 201 in FIG. 2 may invoke a computer executioninstruction stored in the memory 203, so that the apparatus 800, and/orthe apparatus 850 performs the session establishment method in theforegoing method embodiments.

Specifically, functions/implementation processes of the receiving module801, the sending module 804, the determining module 802, and theprocessing module 803 in FIG. 8A, the receiving module 851, the sendingmodule 854, the determining module 852, and the processing module 853 inFIG. 8B, and the receiving module 701, the processing module 702, andthe sending module 703 in FIG. 7 may be implemented by the processor 201in FIG. 2 by invoking the computer execution instruction stored in thememory 203.

Optionally, when the apparatus 800, 850 and/or 700 are chips, afunction/implementation process of each module may be furtherimplemented by using software, a circuit, or the like. Optionally, whenthe apparatus 800, 850 and/or 700 are chips, the memory 203 may be astorage unit in the chip, for example, a register or a cache. Certainly,this is not specifically limited in the embodiments of this application.

The apparatuses provided in the embodiments of this application may beconfigured to perform the foregoing charging method. Therefore, fortechnical effects that can be obtained by the apparatuses, refer to theforegoing method embodiments. Details are not described herein again.

The control plane function entity 800, 850, and/or 700 may beimplemented on an integrated circuit, a radio frequency integratedcircuit, a printed circuit board, and the like. In addition, theapparatus may be a self-supporting device, or may be a part of a largerdevice. In this embodiment, the control plane function entity 800, 850,and/or 700 are presented in a form of function modules obtained throughdivision in an integrated manner. The “module” herein may be a specificASIC, a circuit, a processor and a memory that execute one or moresoftware or firmware programs, an integrated logic circuit, and/oranother component that can provide the foregoing functions.

FIG. 9 is a schematic diagram of a structure of a system 900. Theapparatus system includes the charging function entity 122 in theforegoing embodiments and the control plane function entity 106 in theforegoing entities.

The charging function entity 122 may perform the foregoing embodimentsand any step performed by the charging function entity 122 in FIG. 1 toFIG. 8B. The control plane function entity 106 may perform the foregoingembodiments and any step performed by the control plane function entity106 in FIG. 1 to FIG. 8B. In this embodiment of the present disclosure,details are not described herein again.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When asoftware program is used to implement the embodiments, all or some ofthe embodiments may be implemented in a form of a computer programproduct. The computer program product includes one or more computerinstructions. When the computer program instructions are loaded andexecuted on the computer, the procedure or functions according to theembodiments of this application are all or partially generated. Thecomputer may be a general-purpose computer, a dedicated computer, acomputer network, or other programmable apparatuses. The computerinstructions may be stored in a computer-readable storage medium or maybe transmitted from a computer-readable storage medium to anothercomputer-readable storage medium. For example, the computer instructionsmay be transmitted from a web site, computer, server, or data center toanother web site, computer, server, or data center in a wired (forexample, a coaxial cable, an optical fiber, or a digital subscriber line(digital subscriber line, DSL)) or wireless (for example, infrared,radio, or microwave) manner. The computer-readable storage medium may beany usable medium accessible by a computer, or a data storage device,such as a server or a data center, integrating one or more usable media.The usable medium may be a magnetic medium (for example, a floppy disk,a hard disk, or a magnetic tape), an optical medium (for example, aDVD), a semiconductor medium (for example, a solid-state drive (solidstate disk, SSD)), or the like.

Although this application is described with reference to theembodiments, in a process of implementing this application that claimsprotection, a person skilled in the art may understand and implementanother variation of the disclosed embodiments by viewing theaccompanying drawings, disclosed content, and the appended claims. Inthe claims, “comprising” does not exclude another component or anotherstep, and “a” or “one” does not exclude a meaning of plurality. A singleprocessor or another unit may implement several functions enumerated inthe claims. Some measures are recorded in dependent claims that aredifferent from each other, but this does not mean that these measurescannot be combined to produce a better effect.

Although this application is described with reference to specificfeatures and the embodiments thereof, obviously, various modificationsand combinations may be made to them without departing from the scope ofthis application. Correspondingly, the specification and accompanyingdrawings are merely example description of this application defined bythe appended claims, and is considered as any of or all modifications,variations, combinations or equivalents that cover the scope of thisapplication. Obviously, a person skilled in the art can make variousmodifications and variations to this application without departing fromthe scope of this application. This application is intended to coverthese modifications and variations of this application provided thatthey fall within the scope of protection defined by the following claimsand their equivalent technologies.

What is claimed is:
 1. A charging method, comprising: determining, by acontrol plane function entity, to request a charging function entity toestablish a service-based interface (SBI) charging session for a 4^(th)generation (4G) data connection; sending, by the control plane functionentity, a charging service establishment message to the chargingfunction entity to establish the SBI charging session for the 4G dataconnection; receiving, by the control plane function entity, a chargingsession establishment response message that indicates that the SBIcharging session for the 4G data connection is established; andperforming, by the control plane function entity, online charging and/oroffline charging in the 4G data connection through the SBI chargingsession.
 2. The charging method according to claim 1, wherein thecontrol plane function entity further comprises a session managementfunction, and wherein the determining, by the control plane functionentity, to request the charging function entity to establish an SBIcharging session comprises: determining, by the control plane functionentity based on a 5G system interworking indication parameter in arequest for establishing the 4G data connection, that a terminalsupports an access to a 5G network and that the 4G data connection isallowed to interworking with the 5G network.
 3. The charging methodaccording to claim 1, wherein during handover from the 4G dataconnection to a 5G data connection, the method further comprises:determining, by the control plane function entity, that a 4G handovertrigger is in an active state, and that a type of the 4G handovertrigger is an immediate reporting; and sending, by the control planefunction entity, a charging update message to the charging functionentity through the SBI charging session, wherein the charging updatemessage comprises network usage information of the 4G data connectionand/or a quota request for the 5G data connection after the handover. 4.The charging method according to claim 1, wherein during handover fromthe 4G data connection to a 5G data connection, the method furthercomprises: determining, by the control plane function entity, that a 4Ghandover trigger is in an active state, and that a type of the 4Ghandover trigger is a deferred reporting trigger; stopping, by thecontrol plane function entity, a count of network usage information ofthe 4G data connection; and starting, by the control plane functionentity, a new count of network usage information of the 5G dataconnection after the handover.
 5. The charging method according to claim1, wherein during handover from the 4G data connection to a 5G dataconnection, the method further comprises: determining, by the controlplane function entity, that no active 4G handover trigger is present;and counting, by the control plane function entity, network usageinformation of the 4G data connection and network usage information ofthe 5G data connection after the handover.
 6. The charging methodaccording to claim 4, further comprising: using, by the control planefunction entity for the 5G data connection, a quota obtained for the 4Gdata connection; and processing, by the control plane function entity,an activated 4G charging trigger for the 4G data connection.
 7. Acharging method for network system handover, comprising: sending, by acontrol plane function entity, a charging service establishment messagefor a 5^(th) generation (5G) data connection to a charging function(CHF) entity through a service-based interface (SBI), wherein theservice establishment request message is used for establishing a SBIcharging session for the 5G data connection; sending through the SBIcharging session, by the control plane function entity, a first requestfor performing online charging and/or offline charging in the 5G dataconnection; and after handover from the 5G data connection to a 4G dataconnection, performing through the SBI charging session, by the controlplane function entity, online charging and/or offline charging in the 4Gdata connection.
 8. The charging method according to claim 7, whereinduring the handover from the 5G data connection to the 4G dataconnection, the method further comprises: determining, by the controlplane function entity, that a 5G handover trigger is in an active stateand that a type of the 5G handover trigger is an immediate reportingtrigger; and sending, by the control plane function entity, a chargingupdate message to the charging function entity through the SBI chargingsession, wherein the charging update message comprises network usageinformation of the 5G data connection and/or a quota request for the 4Gdata connection after the handover.
 9. The charging method according toclaim 7, wherein during the handover from the 5G data connection to the4G data connection, the method further comprises: determining, by thecontrol plane function entity, that a 5G handover trigger is in anactive state, and that a type of the 5G handover trigger is a deferredreporting trigger; stopping, by the control plane function entity, thecount network usage information of the 5G data connection; and starting,by the control plane, a new count of network usage information of the 4Gdata connection after the handover.
 10. The charging method according toclaim 9, wherein the method further comprises: continually using, by thecontrol plane function entity, for the 4G data connection in a 4Gnetwork, a quota obtained for the 5G data connection.
 11. The chargingmethod according to claim 7, wherein during the handover from the 5Gdata connection to the 4G data connection, the method furthercomprising: determining, by the control plane function entity, that noactive 5G handover trigger is present; and counting network usageinformation of the 5G data connection and network usage information ofthe 4G data connection.
 12. The charging method according to claim 9,wherein the method further comprises: processing, by the control planefunction entity, an activated 5G charging trigger for the 5G dataconnection.
 13. The charging method according to claim 12, furthercomprising: determining, by the control plane function entity, that theactivated 5G charging trigger for the 5G data connection is notsupported in the 4G data connection after the handover, and ignoring, inthe 4G data connection after the handover, the 5G charging trigger; ordetermining, by the control plane function entity, that the activated 5Gcharging trigger for the 5G data connection is supported in the 4G dataconnection after the handover, and using, in the 4G data connectionafter the handover, the 5G charging trigger; or mapping, by the controlplane function entity, the activated 5G charging trigger for the 5G dataconnection to a 4G charging trigger for the 4G network, and using themapped 4G charging trigger for the 4G data connection after thehandover.
 14. The charging method according to claim 7, wherein after anetwork handover request of the 5G data connection is received, themethod further comprises: determining, by the control plane functionentity, that the control plane function entity does not support passingan online charging data flow in a 4G network before obtaining a quotagranted by the charging function entity; and passing, by the controlplane function entity, the online charging data flow after receiving thequota granted by the charging function entity.
 15. A apparatus,comprising: at least one processor; and a non-transitorycomputer-readable storage medium coupled to the at least one processorand storing one or more instructions that when executed by the at leastone processor, cause the apparatus to perform operations comprising:sending a charging service establishment message for a 5^(th) generation(5G) data connection to a charging function (CHF) entity through aservice-based interface (SBI), wherein the service establishment requestmessage is used to establish an SBI charging session for the 5G dataconnection; performing through the SBI charging session, a first requestfor performing online charging and/or offline charging in the 5G dataconnection; and after handover from the 5G data connection to a 4G dataconnection, performing through the SBI charging session, online chargingand/or offline charging in the 4G data connection.
 16. The apparatusaccording to claim 15, wherein during the handover from the 5G dataconnection to the 4G data connection, the operation further comprises:determining that a 5G handover trigger is in an active state, and that atype of the 5G handover trigger is an immediate reporting trigger, andwherein the first request is a charging update message comprisingnetwork usage information of the 5G data connection, and the secondrequest is a charging update message comprising a quota request for the4G data connection after the handover.
 17. The apparatus according toclaim 15, wherein during the handover from the 5G data connection to the4G data connection, the operation further comprises: determining that a5G handover trigger is in an active state, and that a type of the 5Ghandover trigger is a deferred reporting trigger; stopping a count ofnetwork usage information of the 5G data connection; and starting a newcount of network usage information of the 4G data connection after thehandover.
 19. A charging method, comprising: sending, by a control planefunction entity, a charging service establishment message for a 5^(th)generation (5G) data connection to a charging function (CHF) entitythrough a service-based interface (SBI), wherein the serviceestablishment request message is used to establish an SBI chargingsession for the 5G data connection; performing, by the control planefunction entity and the charging function, online charging and/oroffline charging in the 5G data connection; after handover from the 5Gdata connection to a 4^(th) generation (4G) data connection, performing,by the control plane function entity and the charging function, onlinecharging and/or offline charging in the 4G data connection.
 20. Thecharging method according to claim 19, wherein during the handover fromthe 5G data connection to the 4G data connection, the method furthercomprises: determining, by the control plane function entity, that a 5Ghandover trigger is in an active state, and that a type of the 5Ghandover trigger is an immediate reporting trigger; and sending, by thecontrol plane function entity, a charging update message to the chargingfunction entity through the SBI charging session, wherein the chargingupdate message comprises network usage information of the 5G dataconnection and/or a quota request for the 4G data connection after thehandover.
 21. The charging method according to claim 19, wherein duringthe handover from the 5G data connection to the 4G data connection, themethod further comprises: determining, by the control plane functionentity, that a 5G handover trigger is in an active state, and that atype of the 5G handover trigger is a deferred reporting trigger;stopping, by the control plane function entity, a count of network usageinformation of the 5G data connection; and starting, by the controlplane function entity, a new count of network usage information of the4G data connection after the handover.